import request from '@/utils/request'

export const getDeaprts = () => request({
  url: '/company/department'
})

// 删除部门
export const delDepart = id => request({
  url: `/company/department/${id}`,
  method: 'DELETE'
})
// 新增部门
export const addDeapty = data => request({
  url: '/company/department',
  method: 'POST',
  data
})
// 根据ID查询部门详情
export const seeDepart = id => request({
  url: `/company/department/${id}`
})
// 根据ID修改部门详情
export const updataDeapty = data => request({
  url: `/company/department/${data.id}`,
  method: 'PUT',
  data
})
